#ifndef __RESPOOL_H__
#define __RESPOOL_H__

/*
   respool
*/
struct respool_t
{
  char*  pool;
  char*  buff;
  int    buff_size;
  int    total_size;
};

typedef struct respool_t respool;

#define respool_init(r,b)   \
  (r).pool = (void*)0,        \
  (r).buff = (char*)(b),      \
  (r).buff_size = sizeof (b), \
  (r).total_size = 0

char*   respool_alloc (respool * pool, int size);
void    respool_close (respool * pool);

#endif
